package qianTaoInterface;

import qianTaoInterface.A.Dimp2;

class A {
	private interface D{
		void f();
	}
	private class Dimp implements D{

		@Override
		public void f() {
			System.out.println("private Dimp f()");
		}
		
	}
	public class Dimp2 implements D{

		@Override
		public void f() {
			System.out.println("public Dimp2 f()");
		}
		
	}
	public D getD(){
		return new Dimp2();
	}
	private D dRef;
	public void receiveD(D d){
		dRef=d;
		dRef.f();
	}
}
public class NestingInterfaces{
	public static void main(String[] args) {
		A a = new A();
		/*A.D ad=a.getD();*/
		A.Dimp2 di2= (Dimp2) a.getD();
		a.receiveD(a.getD());
		
	}
}
